<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://developers.facebook.com/schema/">
<head>
	<title>Wattpad - Invite Your Friends</title>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
	<meta name="keywords" content="Wattpad - Invite Your Friends"/>
	<meta name="description" content="Wattpad - Invite Your Friends"/>
	<link rel="shortcut icon" href="../favicon.ico"/>
	<link href='../css/font.css' rel='stylesheet' type='text/css' />
	<link rel='stylesheet' href='../css/web.css' type='text/css' />
    <link rel='stylesheet' href='../css/facebox.css' type='text/css' />
    <script src='../js/jquery.min.js' type='text/javascript'></script>
    <script src='../js/jquery.cookie.min.js' type='text/javascript'></script>
    <script src='../js/facebox.1.3.min.js' type='text/javascript'></script>
    <script src='../js/wattpad.js' type='text/javascript'></script>
	<!--[if IE 6]>
	<script src='../js/DD_belatedPNG_0.0.8a-min.js' type='text/javascript'></script>
	<script type="text/javascript">
		header_png();
	</script>
	<link rel='stylesheet' href='../css/ie6.css' type='text/css' />
	<![endif]-->
	<!--[if IE 7]>
	<link rel='stylesheet' href='../css/ie7.css' type='text/css' />
	<![endif]-->

	<script>
		var _gaq = _gaq || [];
		_gaq.push(['_setAccount', 'UA-886196-1'],['_setDomainName', 'wattpad.com'],['_trackPageview'],['_trackPageLoadTime']);
	</script>
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" >
    <!-- Header Shufle -->
    <div id="bg_header">
		<div class="shuffletab">
			<a href="/shuffle" title="Wattpad Shuffle">
			  <img src='../images/shuffle_icon.png' width='40' height='40' alt='shuffle'  />
			</a>
		</div>
	</div>
    <!-- Header Shufle -->

	<!-- Header Wrapper -->
	<div id="header_wrapper">
	   <div id="header" class="png_bg updated">
            
           <!--Top Menu Header-->
           <div id="top_nav_float">
					<div id="top_nav" class="png_bg">
						<ul class="main_tabs">
							<li class="header_tabs discover_container">
								<div id="discover_tab" class="tab_container has_subtabs">
									<span>Discover</span>
									<div class="search_wrapper png_bg">
										<form action="search-people.html" method="POST" onsubmit="searchOnSubmit(); return false;">
										<input type="text" id="searchinput" class="search_box" name="search" size="16">
										<input type="image" src="../images/searchicon.png" class="search_box_submit"/>
									</form>
									</div>
									<div class="sub_tabs discover">
										<div class="discover_options hover_effect">
											<ul>
												<li><a href="sitemap.html">Categories<img src='../images/arrow_right_white.png' width='12' height='12' alt='arrow_right_white.png'/></a></li>
												<li><a href="featured.html">Featured</a></li>
												<li><a href="watty.html">Watty Awards</a></li>
												<li><a href="undiscovered.html">Undiscovered Gems</a></li>
												<li><a href="index.html">What's Hot</a></li>
												<li><a href="new.html">What's New</a></li>
											</ul>
										</div>
										<div class="discover_categories hover_effect_cat">
											<ul>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Romance')">Romance</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Science Fiction')">Science Fiction</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Fantasy')">Fantasy</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Mystery')">Mystery</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Humor')">Humor</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Paranormal')">Paranormal</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Horror')">Horror</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Adventure')">Adventure</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Thriller')">Thriller</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Historical Fiction')">Historical Fiction</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Teen Fiction')">Teen Fiction</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Fan Fiction')">Fan Fiction</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Poetry')">Poetry</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Short Story')">Short Story</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Non-Teen Fiction')">Non-Teen Fiction</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Action')">Action</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Vampire')">Vampire</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Werewolf')">Werewolf</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Spiritual')">Spiritual</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Non-Fiction')">Non-Fiction</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Classics')">Classics</a></li>
												<li><a href="categories.html" onclick="ga_track('Global Nav', 'Category selected', 'Other')">Other</a></li>
											</ul>
										</div>
									</div>
								</div>
								<a id="logo_click" name="top" href="index.html" rel="nofollow"></a>
							</li>
							<li id="create_tab" class="header_tabs">
								<a href="/mystories"><span>Create</span></a>
							</li>
							<li id="community_tab" class="header_tabs has_subtabs">
								<span>Community</span>
								<div class="sub_tabs community hover_effect">
									<ul>
										<li><a href="insider.html">Insider</a></li>
										<li><a href="clubs.html">Clubs</a></li>
										<li><a href="#">Contests</a></li>
										<li><a href="watty.html">Watty Awards</a></li>
									</ul>
								</div>
							</li>
							
							<li id="user_tab" class="header_tabs has_subtabs shrink">
						          <span class="userinfo">
                                         <img src="../images/b.24.jpg" alt="repotman" align="top" class="smallpic" border="0" width="24" height="24" />
							             <span>repotman</span>
								  </span>
						          <div class="sub_tabs user hover_effect">
									   <ul>
										  <li><a href="myprofile.html"><span>My Profile</span><img src='../images/profile_icons_me.png'  alt='profile_icons_me.png'  /></a></li>
										  <li><a href="inbox.html"><span>My Inbox</span><img src='../images/profile_icons_message.png'  alt='profile_icons_message.png'  /></a></li>
										  <li><a href="mystories.html"><span>My Works</span><img src='../images/profile_icons_lighting.png'  alt='profile_icons_lighting.png'  /></a></li>
										  <li><a href="reading-list.html"><span>Reading Lists</span><img src='../images/profile_icons_RL.png'  alt='profile_icons_RL.png'  /></a></li>
										  <li><a href="invite.html"><span>Invite Friends</span><img src='../images/profile_icons_friends.png'  alt='profile_icons_friends.png'  /></a></li>
										  <span class="profile_divider"></span>
										  <li><a href="edit-profile.html"><span>Settings</span></a></li>
										  <li><a href="../index.html"><span>Logout</span></a></li>
									   </ul>
								</div>
							</li>
							
							<li class="header_tabs nav_links">
								<a href="#" title="Help"><img src='../images/help.png' width='15' height='14' alt='help.png'  /></a>
								<!--
								<a href="#" onclick="$.facebox({ajax:'/dialog/language'})">
									English	<img src='http://a.wattpad.net/image/90476/v2/top/arrow_right_white.png' width='8' height='8' alt='arrow_right_white.png'  />								
								</a>
								-->
							</li>
						</ul>
					</div>
	       </div>
           <!--Top Menu Header-->
           
        </div>
			
			<script type="text/javascript">
				cleanHeaderBar();
			</script>

			<!--[if IE 6]>
			<script type="text/javascript">
				cleanHeaderBarIE6();
			</script>
			<![endif]-->

    </div>
    <!-- Header Wrapper -->
		
<!-- Content Wrapper -->		
<div id="content_wrapper">
    <!-- Content Background -->
    <div id="content_bg" class="png_bg">
    <!-- Content-->
    <div id="content">		
        <!--Tag Menu -->
        <div style="margin: 1.5em; text-align: center;">
        	<span class="info_tabs nounderline" style="font-size:16px; font-weight: bold; margin-left:2em;">
        		<img src='../images/writer_tools_promote_address_book.png' width='18' height='18' alt='writer_tools_promote_address_book.png' style='margin: 0 0.2em'  />
                <span class="info_tabs_selected nohover" style="vertical-align: middle">Invite</span>
        	</span>
        </div>
        <!--Tag Menu-->
        
       <!--Invite Container--> 
	   <div style="border:1px solid #333; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; margin: 1em auto; padding: 20px; position: relative; width: 45%">
		    <h1 style="font-size: 18px; text-align: center;">Invite Your Friends</h1>
            <p style="margin: 15px auto; width: 90%;">
                Invite your friends to join the largest community of readers and writers on the web.
            </p>
            <!--Form Invite Container-->
            <form id="invite_friends_form" action="#" method="post" enctype="multipart/form-data" style="margin: 0 auto; width: 90%;">
			     <div class="search_panel">
				        <input class="text_field" autofocus maxlength="128" name="email" placeholder="Enter an email address here" tabindex="10" type="text"/>
				        <input class="submit" type="submit" tabindex="20" value="" />
				 </div>
				<br style="clear: both;"/>
				<!--<a id="import_emails" href="#" style="display:block; padding: 2px; text-align: right;">import contacts</a>-->

				<div class="emails_container" style="display: none;"></div>
				<textarea class="email_content" type="text" name="content" maxlength="2000" tabindex="30">Check out Wattpad to discover and share stories. See what stories I've been reading and writing.</textarea>

				<div class="ajax_error" style="min-height: 20px; padding: 10px; text-align:center;"></div>
				<div style="text-align: center">
                    <input class="b2 orange" name="invite_friends_submit" tabindex="40" type="submit" value="Invite" />
                </div>
			</form>
            <!--Form Invite Container-->

			<div id="spinner" style="display: none; position: absolute; top: 50%;left: 50%; margin-left: -16px">
			     <img src='../images/spinner.gif' width='32' height='32' alt='spinner.gif'  />		
            </div>

		<div id="message" style="display: none; position: absolute; top: 60%; left: 50%; margin: 10px 0 0 -150px; width: 300px;">
			<div class="ajax_success"></div>
		</div>
	  </div>
      <!--Invite Container-->

	<script type="text/javascript" src="../js/address_books.js"></script>
	<script type="text/javascript" charset="utf-8">
		csInit({
			domain_key: '4KBL32K6JLRJDBTZ2BRQ',
			mobile_render: true,
			afterSubmitContacts: function (contacts) {
			 for (i = 0; i<contacts.length; i++) {
				 ga_track('Invite Friends - Email', 'Import', 'Number of Contacts Imported', contacts.length);
				 addEmail(contacts[i]['email'][0]['address'], true);
			 }
			 return true;
			}
		});
	</script>
	<script type="text/javascript">
		var HOME_PATH = 'home.html';
		var REDIRECT_TIMEOUT = 5000;
		var emails = [];

		function addEmail(email, display) {
			var regex = /[!#$%&\'*+-\/=?^_`{|}~a-z0-9-]+(\.[!#$%&\'*+-\/=?^_`{|}~a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i;

			if (email.match(regex)) {
				if (emails.indexOf(email)===-1) {
					ga_track('Invite Friends - Email', 'Add Email', 'Valid', 1);

					emails.push(email);

					if (display) {
						var html = $('<div>')
							.addClass('item')
							.html('<span class="content">'+email+'</span>'+'<span class="cancel">X</span>')
							.appendTo('.emails_container');

						$('.emails_container')[0].scrollTop = $('.emails_container')[0].scrollHeight;
					}
				}

				if (!$('.emails_container').is(':visible')) {
					$('.emails_container').show();
				}

				return true;
			}
			else {
				ga_track('Invite Friends - Email', 'Add Email', 'Invalid', 0);

				alert('Whoops! Please try entering that email again.');

				return false;
			}
		}

		function removeEmail(email) {
			var index = emails.indexOf(email);
			if (index!==-1) {
				emails.splice(index, 1);
			}
		}

		function doneHandler() {
			window.location.href = HOME_PATH;
		}

		$(document).ready(function () {
			$('.search_panel .text_field').bind('change keyup', function () {
				var filename = $('.search_panel .submit').css('background-image');
				if ($(this).val().length) {
					if (filename.indexOf('over')===-1) {
						filename = filename.replace(new RegExp("(.+).(png)", "g"), "$1_over.$2")
						$('.search_panel .submit').css('background-image', filename);
					}
				}
				else {
					if (filename.indexOf('over')!==-1) {
						filename = filename.replace(new RegExp("(.+)_over.(png)", "g"), "$1.$2")
						$('.search_panel .submit').css('background-image', filename);
					}
				}
			});

			$('.search_panel .submit').click(function () {
				var email = $('.search_panel .text_field').val();

				if (addEmail(email, true)) {
					$('.search_panel .text_field').val('');
				}

				return false;
			});

			$('.item .cancel').live('click', function () {
				ga_track('Invite Friends - Email', 'Remove Email');

				removeEmail($(this).siblings('.content').html());
				$(this).parent().remove();

				return false;
			});

			$('#import_emails').click(function () {
				ga_track('Invite Friends - Email', 'Import', 'Click');

				cloudsponge.launch();

				return false;
			});

			$('[name="invite_friends_submit"]').click(function () {
				var email = $('.search_panel .text_field').val();

				if ((email.length && addEmail(email, false)) || (!email.length && emails.length)) {
					$('#invite_friends_form').parent().css('min-height', $('#invite_friends_form').parent().height());
					$('#invite_friends_form').slideUp('slow', function () {
						$('#spinner').slideDown('slow');
						$('#message').slideDown('slow');
						$('.ajax_success').html('Sending');

						$.ajax({
										 type: 'POST',
										 url: API2_PATH+'userinvites',
										 data: {
											 'id':2944199,
											 'emails': emails.join(','),
											 'content': $('.email_content').val()
										 },
										 dataType: 'json',
										 success: function (data) {
											 ga_track('Invite Friends - Email', 'Form Submit', 'Number of Contacts', emails.length);

											 var message = data['message']+' '+'You will be redirected within a few seconds'+'...';

											 $('#spinner').fadeOut('slow', function () {
												 $('#message').fadeOut('slow', function () {
													 $('.ajax_success').html(message);
													 $('#message').fadeIn('slow');
												 });
											 });

											 window.setInterval(doneHandler, REDIRECT_TIMEOUT);
										 },
										 error: function (data) {
											 var message = JSON.parse(data.responseText)['message'];

											 $('#message').slideUp('slow', function () {
												 $('#spinner').slideUp('slow', function () {
													 $('.ajax_error').html(message);
													 $('#invite_friends_form').slideDown('slow');
												 });
											 });
										 }
									 });
					});
				}
				else if (!email.length && !emails.length) {
					alert('Enter an email address and try again');
				}

				return false;
			});
		});
	</script>
		<!--Sponsor Bottom-->
	<div id="ad_bottom_banner" style="clear:both;text-align:center;padding-bottom:10px">
        <div class="ad">sponsor</div>
        <iframe src="http://optimized-by.rubiconproject.com/a/7941/12756/23272-2.html?" FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="NO" WIDTH="728" HEIGHT="90"></iframe>
	</div>	
    <!--Sponsor Bottom-->
    
 </div>
 <!-- End Content -->
 
 <!-- Content Bottom -->
 <div id="content_bottom" class="png_bg"></div>
  <!-- Content Bottom -->
  
    <!-- Footer-->
    <div id="foot">
		<div class="col1">
			<!--<a href="http://www.facebook.com/wattpad" rel="nofollow"><img src='http://a.wattpad.net/image/11668/v2/footer/facebook.png' width='30' height='32' alt='facebook.png' style='margin:0 5px 10px 0'  /></a>
			<a href="http://twitter.com/wattpad" rel="nofollow"><img src='http://a.wattpad.net/image/11668/v2/footer/twitter.png' width='30' height='32' alt='twitter.png' style='margin:0 5px 10px 0'  /></a>
			<a href="http://www.youtube.com/user/wattpad" rel="nofollow"><img src='http://a.wattpad.net/image/11668/v2/footer/youtube.png' width='32' height='32' alt='youtube.png' style='margin:0 5px 10px 0'  /></a>
			<br>-->
			MADE IN ENGLAND <img src='../images/canada.png' width='12' height='14' alt='canada.png'  /><br/>
			&copy; 2012 WP Technology Inc.
			
			
		</div>
		
    	<div style="float: right;">
    		<div class="col2">
    			WATTPAD<br/>
    			<a href="about.html">ABOUT US</a><br/>
    			<a href="blog.html" rel="nofollow">BLOG</a><br/>
    			<a href="jobs.html" rel="nofollow">JOBS</a><br/>
    		</div>
    		<div class="col2">
    			HELP<br/>
    			<a href="#">QUESTIONS?</a><br/>
    			<a href="contact_us.html" rel="nofollow">CONTACT US</a><br/>
    			<a href="#" rel="nofollow">GIFT SHOP</a><br/>
    		</div>
    		<div class="col2">
    			MORE INFO<br/>
    			<a href="terms.html" rel="nofollow">TERMS OF SERVICE</a><br/>
    			<a href="privacy.html" rel="nofollow">PRIVACY POLICY</a><br/>
    			<a href="codeofconduct.html" rel="nofollow">CODE OF CONDUCT</a><br/>
    		</div>
    	</div>
        
    </div>
    <!-- Footer-->
  </div>
</div>
<script type="text/javascript">
	if ($("#system_message").length>0) {
		$('#content').css("padding-top", "30px");
		$('#content_block').css("padding-top", "30px");
	}

	if (isMobile()) {
		$('#header').css("position", "relative");
	}
	$('body, #top_nav_float, #header').css('background', 'url(\'../images/linen.jpg\') fixed');</script>
<!-- GA -->
<script type="text/javascript">
(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

<!-- QC -->
<script type="text/javascript">
  var _qevents = _qevents || [];
  (function() {
   var elem = document.createElement('script');
   elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js";
   elem.async = true;
   elem.type = "text/javascript";
   var scpt = document.getElementsByTagName('script')[0];
   scpt.parentNode.insertBefore(elem, scpt);
  })();
</script>
<script type="text/javascript">
_qevents.push( { qacct:"p-45MMy5TH1XE82"} );
</script>
<noscript>
<div style="display: none;"><img src="images/p-45MMy5TH1XE82.gif" height="1" width="1" alt="Quantcast"/></div>
</noscript>
</body>
</html>